import { VTranRecordInfo } from '../../types/vTranRecordInfo'
import { VTranRecordInfoDao } from '../dao/vTranRecordInfoDao'
import { PageReq } from '../../types/page'

export class VTranRecordInfoService {
  /**
   * 根据ID获取训练记录详情
   */
  static async getById(id: number): Promise<VTranRecordInfo> {
    return VTranRecordInfoDao.getById(id)
  }

  /**
   * 分页查询训练记录列表
   */
  static async page(params: PageReq<Partial<VTranRecordInfo>>) {
    return VTranRecordInfoDao.page(params)
  }


  //查下已训练患者
  static async getTrainers() {
    return VTranRecordInfoDao.getTrainers()
  }

  //根据trainer_id查下训练日期
  static async getTrainerDates(trainer_id: number) {
    return VTranRecordInfoDao.getTrainerDates(trainer_id)
  }
  
  //根据trainer_id和course_date查下训练记录
  static async getTrainerRecords(trainer_id: number, course_date: string[]) {
    return VTranRecordInfoDao.getTrainerRecords(trainer_id, course_date)
  }
}